project(LIBMYAPI C)
cmake_minimum_required(VERSION 2.6.3)
#set ( CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake_admin )

include(GNUInstallDirs)

# package version
set (LIBMYAPI_VERSION_MAJOR 1)
set (LIBMYAPI_VERSION_MINOR 0)
set (LIBMYAPI_VERSION_MICRO 0)
set (VERSION "${LIBMYAPI_VERSION_MAJOR}.${LIBMYAPI_VERSION_MINOR}.${LIBMYAPI_VERSION_MICRO}")
set (LIBMYAPI_VERSION "\"${VERSION}\"")

set(HEADER_FILES
	include/myapi.h
)

add_subdirectory(src)
add_subdirectory(utils)

install(FILES ${HEADER_FILES}
    DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/myapi
)

configure_file(myapi.pc.in myapi.pc @ONLY)
install(FILES ${PROJECT_BINARY_DIR}/myapi.pc
    DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig
)
